
package org.xteam.pascal.parser.ast;

import org.xteam.parser.runtime.Span;

public class If extends Statement {
	
	public org.xteam.parser.runtime.reflect.AstNodeType getNodeType() {
		return PascalAstPackage.INSTANCE.getIfType();
	}
	
	protected Expression condition;
	protected Statement thenStatement;
	protected Statement elseStatement;
	
	public If(Span span, Expression condition,Statement thenStatement,Statement elseStatement) {
		super(span);
		this.condition = condition;
		this.thenStatement = thenStatement;
		this.elseStatement = elseStatement;
	}
	
	
	public Expression getCondition() {
		return condition;
	}
	
	public void setCondition(Expression condition) {
		this.condition = condition;
	}
	
	public Statement getThenStatement() {
		return thenStatement;
	}
	
	public void setThenStatement(Statement thenStatement) {
		this.thenStatement = thenStatement;
	}
	
	public Statement getElseStatement() {
		return elseStatement;
	}
	
	public void setElseStatement(Statement elseStatement) {
		this.elseStatement = elseStatement;
	}
	

	public void visit(IPascalVisitor visitor) {
		visitor.visitIf(this);
	}
}
